package com.example.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisShardInfo;

@Configuration
public class RedisConfig {
  
  @Bean(value = "jedis")
  public Jedis getJedis() {
    JedisShardInfo jedisShardInfo = new JedisShardInfo("192.168.56.12", 6379);
    jedisShardInfo.setPassword("123456");
    Jedis jedis = new Jedis(jedisShardInfo);
    return jedis;
  }
}
